package com.rk.kbk.model;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.rk.kbk.common.DateJsonDeserializer;
import com.rk.kbk.common.DateJsonSerializer;
import org.hibernate.annotations.GenericGenerator;
import org.springframework.format.annotation.DateTimeFormat;

import javax.persistence.*;
import java.io.Serializable;

/**
 * @SellerWithdraw
 * @(seller_withdraw)
 * @version : Ver 1.0
 */
@Entity
public class SellerWithdraw implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * @备注:主键(商家提现流水)
	 * @字段:id BIGINT(19)
	 */
	@Id
	@GeneratedValue(strategy= GenerationType.IDENTITY)
	@GenericGenerator(name="auto-identity",strategy="identity")
	@Column(updatable = false, columnDefinition="BIGINT(19) COMMENT '主键(商家提现流水)'")
	private Long id;

	/**
	 * @备注:创建时间
	 * @字段:gmt_datetime DATETIME(19)
	 */
	@Column(updatable = false, columnDefinition="DATETIME(19) COMMENT '创建时间'")
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date gmtDatetime = new java.util.Date();

	/**
	 * @备注:修改时间
	 * @字段:upt_datetime DATETIME(19)
	 */
	@Column(columnDefinition="DATETIME(19) COMMENT '修改时间'")
	@JsonSerialize(using=DateJsonSerializer.class)
	@JsonDeserialize(using=DateJsonDeserializer.class)
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss" )
	private java.util.Date uptDatetime = new java.util.Date();

	/**
	 * @备注:关联用户id
	 * @字段:user_id BIGINT(19)
	 */
	@ManyToOne
	@JoinColumn(name="userId", columnDefinition="BIGINT(19) COMMENT '关联用户id'")
	private User user;

	/**
	 * @备注:提现账号
	 * @字段:draw_id BIGINT(19)
	 */
	@ManyToOne
	@JoinColumn(name="drawId", columnDefinition="BIGINT(19) COMMENT '提现账号'")
	private WithdrawMesg withdrawMesg;

	/**
	 * @备注:提现金额
	 * @字段:draw_price DECIMAL(14)
	 */
	@Column(columnDefinition="DECIMAL(14) COMMENT '提现金额'")
	private java.lang.Double drawPrice;

	/**
	 * @备注:本次手续费
	 * @字段:commission_price DECIMAL(14)
	 */
	@Column(columnDefinition="DECIMAL(14) COMMENT '本次手续费'")
	private java.lang.Double  commissionPrice;

	/**
	 * @备注:提现状态1代表审核中2代表审核通过3代表审核失败
	 * @字段:status INT(10)
	 */
	@Column(columnDefinition="INT(10) COMMENT '提现状态1代表审核中2代表审核通过3代表审核失败'")
	private Integer status;

	/**
	 * @备注:提现手续费
	 * @字段:withdraw_poundage VARCHAR(33)
	 */
	@Column(columnDefinition="VARCHAR(33) COMMENT '提现手续费'")
	private java.lang.Double  withdrawPoundage;

	/**
	 * @备注:商户应到账金额
	 * @字段:seller_price DECIMAL(14)
	 */
	@Column(columnDefinition="DECIMAL(14) COMMENT '商户应到账金额'")
	private java.lang.Double  sellerPrice;

	/**
	 * @备注:提现类型:1代表余额提现2代表押金提现
	 * @字段:withdraw_type INT(10)
	 */
	@Column(columnDefinition="INT(10) COMMENT '提现类型:1代表余额提现2代表押金提现'")
	private Integer withdrawType;

	public SellerWithdraw(){
	}

	public SellerWithdraw(
		Long id
	){
		this.id = id;
	}



	public void setId(Long id) {
		this.id = id;
	}

	public Long getId() {
		return this.id;
	}


	public void setGmtDatetime(java.util.Date gmtDatetime) {
		this.gmtDatetime = gmtDatetime;
	}

	public java.util.Date getGmtDatetime() {
		return this.gmtDatetime;
	}


	public void setUptDatetime(java.util.Date uptDatetime) {
		this.uptDatetime = uptDatetime;
	}

	public java.util.Date getUptDatetime() {
		return this.uptDatetime;
	}


	public void setUser(User user) {
		this.user = user;
	}

	public User getUser() {
		return this.user;
	}


	public WithdrawMesg getWithdrawMesg() {
		return withdrawMesg;
	}

	public void setWithdrawMesg(WithdrawMesg withdrawMesg) {
		this.withdrawMesg = withdrawMesg;
	}

	public Double getDrawPrice() {
		return drawPrice;
	}

	public void setDrawPrice(Double drawPrice) {
		this.drawPrice = drawPrice;
	}

	public Double getCommissionPrice() {
		return commissionPrice;
	}

	public void setCommissionPrice(Double commissionPrice) {
		this.commissionPrice = commissionPrice;
	}

	public Double getWithdrawPoundage() {
		return withdrawPoundage;
	}

	public void setWithdrawPoundage(Double withdrawPoundage) {
		this.withdrawPoundage = withdrawPoundage;
	}

	public Double getSellerPrice() {
		return sellerPrice;
	}

	public void setSellerPrice(Double sellerPrice) {
		this.sellerPrice = sellerPrice;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getStatus() {
		return this.status;
	}

	public void setWithdrawType(Integer withdrawType) {
		this.withdrawType = withdrawType;
	}

	public Integer getWithdrawType() {
		return this.withdrawType;
	}
}
